package com.app.util.db.bean;

import java.util.LinkedHashSet;
import java.util.Set;

import com.app.util.string.StringUtil;

public class OrderBy {

	private Set<OrderItem> orderItems = new LinkedHashSet<OrderItem>();

	public OrderBy(OrderItem orderItem) {
		orderItems.add(orderItem);
	}

	public void addOrderItem(OrderItem orderItem) {
		orderItems.add(orderItem);
	}

	public String toString() {
		StringBuffer sb = new StringBuffer("ORDER BY ");
		sb.append(StringUtil.linkString(orderItems, ","));
		return sb.toString();
	}

} 